﻿@model IEnumerable<System.IO.FileInfo>

@using Q42.Wheels.Mvc.Paging

@{
  ViewBag.Title = "Razor Paging";
}

<h2>@ViewBag.Title</h2>
<table>
  <tr>
    <th>
      @Html.RenderSortLink("FullName")
    </th>
    <th>
      @Html.RenderSortLink("What follows after the dot?", "Extension")
    </th>
    <th>
      @Html.RenderSortLink("CreationTime")
    </th>
    <th>
      @Html.RenderSortLink("ModificationTime", "LastWriteTime")
    </th>
  </tr>
  @foreach (System.IO.FileInfo file in this.GetPage(Model)) 
  {
  <tr>
    <td>
      @file.FullName
    </td>
    <td>
      @file.Extension
    </td>
    <td>
      @file.CreationTime
    </td>
    <td>
      @file.LastWriteTime
    </td>
  </tr>
  }
  <tr>
    <td colspan="4">
      @Html.RenderPagination()
    </td>
  </tr>
</table>